<?php
session_start();

 if($_SESSION['fl']!=1)
{
	header("Location:home.html");
}





?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head><link rel="stylesheet" type="text/css" href="goplaces.css" />
<script type="text/javascript" src="getcode.js">
</script>
<body>
<form name="addtours" action="addtrip.php" method="post" onsubmit="return insertvalidate()" >
<div id="header">
		<a href="home.html" class="logo"><img src="images/logo.jpg" alt="" width="274" height="90" /></a>		
         		
  		<a class="facebook">  <iframe src="http://www.facebook.com/plugins/likebox.php?href=https%3A%2F%2Fwww.facebook.com%2Fpages%2FETrawels%2F132726943479075&amp;width=150&amp;colorscheme=light&amp;show_faces=false&amp;border_color&amp;stream=false&amp;header=false&amp;height=62" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:150px; height:80px;" allowtransparency="true"></iframe></a>
 																														
	  <a href="http://twitter.com/etrawels" class="twitter-follow-button" data-show-count="false" >Follow @etrawels</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script> 

<strong>
<a href="logout.php">Log out</a></strong>
		<ul id="menu">
            <li> </li>
            <li> </li>
            <li> </li>
            <li> </li>
            <li> </li>
			<li><a href="home.html" >Home Page</a></li>
			<li><a href="aboutus.html" >Company Profile</a></li>
			<li><a href="tours.html" >Tours and Packages</a></li>
			<li><a href="visa.html">Visa Procedures & Assistance</a></li>
			<li><a href="booking.php" >Bookings</a></li>
			<li><a href="feedback.php" >Feedback</a></li>
			<li><a href="Sitemap.html">Sitemap</a></li>
			<li><a href="maps.html" >Trip Planner</a></li>
			
	  </ul>
	</div>
    <div id="bookwrapper">
  
    <div id="bon">
 Tour Database
     </div>
   
   <div id="belowwrapper">
 <p>
<a href="admin1.php"><input type="button" value="Back to Admin main page" name="tourdata" style="background:#6CF" /></a></p><br /><br /><br />
   <?php 


$con=mysql_connect('localhost','root','');
if(!$con)
{
  die('could not connect:'.mysql_error());
  }
  mysql_select_db("ETrawelMart",$con);
  
 
  
  $check=mysql_query("SELECT * FROM tours");
  
print "<table width=800 align=\"center\"  border=1>\n"; 
print "<tr>\n";
print "<th>tripcode</th><th>tripname</th><th>days</th><th>cost</th><th>availability</th><th>Delete</th>";
print "</tr>";

while ($row=mysql_fetch_array($check)){ 

$tripcode=$row['tripcode'];
$tripname=$row['name'];
$days=$row['days'];
$cost=$row['cost'];
$dates=$row['dates'];
print "<tr>\n"; 

print "\t<td><font face=arial size=3 color=\"#000000\"/>$tripcode</font></td>\n";
print "\t<td><font face=arial size=3 color=\"#000000\"/>$tripname</font></td>\n"; 
print "\t<td><font face=arial size=3 color=\"#000000\"/>$days</font></td>\n";
print "\t<td><font face=arial size=3 color=\"#000000\"/>$cost</font></td>\n";
print "\t<td><font face=arial size=3 color=\"#000000\"/>$dates</font></td>\n";
echo "\t<td><font face=arial size=3/><a href=\"tourdelete.php?id=$tripcode\">Delete</a></font></td>\n";
print "</tr>\n"; 
} 
print "</table>\n"; 
  
  
  
    mysql_close($con);
  
  	 
?>
<br /><p>
Insert a new tour</p>
<br /> 
<font size="+1" color="#000066"><p>
     Trip Code:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="tripcode" /></p>
<br />
<br /><p> &nbsp;&nbsp;name:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="tripname" /></p>

<br /><p> &nbsp;&nbsp;days:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="days"   onkeypress="return chknum()" /></p>

<br /><p> &nbsp;&nbsp;cost:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" name="cost" onkeypress="return chknum()" /></p>

<br /><p> &nbsp;&nbsp;availability:<input type="text" name="available" /></p>
<br /><p><input type="submit" name="submit" value="ADD" />&nbsp; &nbsp;<input type="reset"  name="reset" /> </p></font>
</p><br /><br /><br />
<a href="admintours.php"><input type="button" value="Back" name="tourdata" style="background:#6CF" /></a>

</div>



    
    
  </div>  
    
    
  
    
    
    
    
    
    
    <div id="footer">
		<ul>
			<li></li>
			<li></li>
			<li></li>
			<li></li>
			<li><a href="home.html">Home Page</a>|</li>
			<li><a href="aboutus.html">Company Profile</a>|</li>
			<li><a href="tours.html">Tours and Packages</a>|</li>
			<li><a href="Visa.html">Visa Procedures & Assistance</a>|</li>
            <li><a href="Bookings.html">Bookings</a>|</li>
			<li><a href="Feedback.html">Feedback</a>|</li>
			<li><a href="Sitemap.html">Sitemap</a>|</li>
			<li><a href="Tripplanner.html">Trip Planner</a>|</li>
		</ul>
																																																					
	</div>
   
</form>
</body>
</html>